Improvements in personal computer designs has led to new designs that support multiple peripheral devices. The peripheral devices range from digital joysticks, scanners, digital speakers, digital cameras, to personal computer telephones. In conjunction with the advent of improved personal computer designs, microprocessors with high operating frequencies and large memory storage are also being developed. Accordingly, the combination of new personal computer designs and high speed microprocessors has resulted in computer systems concurrently running multiple applications while supporting multiple peripheral devices.
Prior art computer system supported peripheral devices by mapping descriptions of the peripheral devices to the microprocessor's input/output ("I/O") address space. The mapping process, however, creates numerous disadvantages. In particular, the mapping process combined with the operation of multiple applications exhausts the computer system's resource space. Furthermore, the mapping process typically results in I/O conflicts within the computer system. Additionally, in prior art computer systems the addition of new devices requires installation of expansions cards to support the communication between the computer system and the newly added device.
To counteract the disadvantages of the I/O mapping process, a Universal Serial Bus ("USB") system was developed in the prior art. USB systems provide a robust interface that allows multiple peripheral devices to couple to a computer system without reconfiguration concerns. USB systems also provide automatic detection and configuration of peripheral devices without exhausting the computer system's resources.
Typically, USB systems operate by creating a bounded transmission media between the computer system and the multiple peripheral devices connected to the computer system. The bounded transmission media has a guaranteed bandwidth and bounded delays between packet transmission. To maintain the bounded transmission media and the robust interface, the USB system consists of a multi-component software layer that interacts directly with the USB hardware.
FIG. 1 illustrates one embodiment of a prior art computer system. In particular, computer system 100 shows primary system 102 coupled to peripheral devices 110 through 170. Primary system 102 comprises monitor 110 coupled to central processing unit 105. Typically, computer system 100 executes software instructions provided to system 100 using a microprocessor (not shown) included in central processing unit 105. The executed software instruction are displayed on monitor 110. Central processing unit 105 also includes a USB interface, USB root hub 115. USB root hub 115 includes two ports and provides a communication media between primary system 102 and peripheral devices 110 through 170. Accordingly, transactions generated by central processing system 105 are forwarded to USB root hub 115 and transmitted to a particular peripheral device. Using USB root hub 115, computer system 100 manages peripheral devices 110 through 170 without exhausting system resource. In particular, by forwarding data and instructions via USB root hub 115, computer system controls power to USB ports, enables/disables ports, recognizes devices coupled to each port, and reports status events associated with each port to central processing unit 105.
For one embodiment, peripheral devices 110 through 170 are coupled via a hub dual port interface. For alternative embodiments, hubs couple to peripheral devices via multi-port interfaces. As illustrated in FIG. 1, the USB root hub 115 includes two ports, port 115a and 115b. Port 115b is coupled to keyboard 120 and port 115a is coupled to monitor 110. In particular, as illustrated in FIG. 1, hub 116 is included in monitor 110. Hub 116 provides two connection ports, port 116a and port 116b. Port 116a couples monitor 110 to port 115a and port 116b is coupled to hub 130. Hub 130 provides two connection ports, port 130a and port 130b. Port 130a is coupled to joy stick 140 and port 130b is coupled to hub 150. Hub 150 is coupled to digital speakers 160 and digital scanner 170 via ports 150a and 150b, respectively. Similar to USB root hub 115, hub 116, hub 130, and hub 150 provide additional connection ports. In particular, hubs 116, 130 and 150 are used to forward data towards primary interface 102, upstream direction, or to forward data toward a peripheral device, downstream direction. For one embodiment, the transmitted data includes the device descriptors of devices coupled to the downstream ports of the hub. Hubs 116, 130, and 150 also transmit a status report upstream when polled by central processing unit 105. The status report includes information regarding the attachment/detachment of a device, the number of downstream ports, and the power model of the hub. The physical communication between primary interface 102 and peripheral devices 110 through 170 is maintained by USB hub root 115. The sequencing and evaluation of the communicated data, however, is maintained by USB software layers.
FIG. 2 illustrate one embodiment of a prior art USB software layers. The first layer, application 205 comprises software loaded into primary interface 102. Typically, the loaded software requires interacts with a peripheral device. For example, for one embodiment, the loaded software requires input from a user via peripheral device keyboard 120. Because multiple peripheral devices are available to communicate with a given application, USB software layers 215 through 220 and USB hardware controller 225 are used to provide a communication protocol between application 205 and the multiple peripheral device.
The second layer of the prior art USB software layers is operating system ("OS") 210. OS 210 includes device drivers (not shown) for each class of device coupled to computer system 100. A class corresponds to a group of peripheral devices that have similar attributes and services. For example, a given class of device comprises any compact disc ("CD") device coupled to computer system 100. Accordingly, a CD device driver object code describing the CD device's functional interface exists in OS 210. Similarly, another class of device comprises any hub device coupled to computer system 100. Thus, to supports hubs a hub driver object code describing the hub's functional interface exists in OS 210. Typically, the device drivers are loaded into central processing unit 105 during a reset. Subsequent to the reset of central processing unit 105, OS 210 detects and enumerates the actual peripheral devices coupled to USB root hub 115. Using a list of enumerated devices, OS 210 manages and maintains the communication between application 205 and peripheral devices coupled to computer system 100. Application 205, however, is unaware of the USB serial transfer mechanisms involved in the USB interface of computer system 100.
USB driver ("USBD") 215 provides the software interface for the USB serial transfer mechanisms. USBD 215 maintains the characteristics of each USB device 230-N recognized by OS 210. Accordingly, when data is transferred downstream/upstream USBD 215 organizes the data transfer into individual transactions that satisfy the guaranteed bandwidth of the USB.
Subsequent to the organization of data transfer by USBD 215, host controller driver ("HCD") 220 schedules the data transfer over the USB interface. The scheduling of data transfers is performed via transaction lists generated by HCD 220. Each list consists of pending transaction targeted to one or more of the USB devices 230-N. In particular, a transaction list typically includes the USB device address, type of transfer, direction of transfer, and the address of the device driver's memory buffer where data is stored.
Using the scheduling information the last layer of USB software layers, USB host controller 225, executes the scheduled transactions. Two types of transaction are processed by USB host controller 225, write and read transactions. In a write transaction, USB host controller 225 reads data from the memory buffer, performs a parallel to serial conversion, generates a transmission packet, and transmits the packet over the USB interface via USB root hub 115. During a read transaction, USB host controller 225 generates a read transaction packet and transmits the read transaction packet over the USB interface via USB root hub 115. Subsequent to the transmission of the read transaction packet, the target device recognizes that data is requested and transmits a response to USB root hub 115. The USB root hub 115 forwards the transmitted data to USB host controller 225. USB host controller 225, in turn, performs a serial to parallel conversion and returns the data to the device driver's memory buffer.
As previously described, the multiple software layers in conjunction with the USB hardware configuration allow the USB system to detect/support multiple peripheral devices coupled to computer system 100. Furthermore, the addition of hubs to the USB system provides a tiered topology where hubs provide ports for the addition of peripheral devices. The tiered topology, however, requires that a given hub is responsible for the maintenance/status of the peripheral devices coupled to the downstream ports of the hub. For example, provided a new hub is coupled to computer system 100. The new hub is responsible for generating a status report whenever polled by central processing unit 105. Typically, the status report indicates the attachment/detachment of device, the number of downstream ports, and the power model of the hub.
One disadvantage of the tiered topology results from an overcurrent event. An overcurrent event describes a device consuming power that exceeds the threshold power available from a downstream port of a hub. In particular, provided a downstream rogue device coupled to a hub causes an overcurrent event, during the status report the hub relays the overcurrent event to USBD 215 via an overcurrent bit indicator. A USB hub driver via USBD 215, in turn, automatically shuts down the port supplying connection to the rogue device via HCD 220 and USB host controller 225. The automatic shutdown of the port, however, is not apparent to the end user of computer system 100. Furthermore, the downstream port of the affected hub remains inoperable until the hub is reset. Accordingly, removing the rogue device does not restore operation to the downstream port. Thus, the end user incorrectly believes that the primary interface 102, monitor 110, or USB root hub 115 is operating incorrectly.